﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucViewProduct.ascx.cs" Inherits="Website.ucViewProduct" %>
<style>
        #divBasket{
			/*display:block;*/
			font-size:10px;
			/*set the div in the bottom right corner*/
			/*position:absolute;*/
			bottom:0;
			right:0;

			/*give it some background and border*/
			background:#eee;
			border:1px solid #ddd;
			position: fixed;
			z-index:10;
			overflow:scroll;
  		}
    
    </style>

    <div width="300px">
   
        <table border="1px" width="100%" cellspacing="5px">
            <tr>
                <td class="ImageProduct">
                    <asp:Image ID="ImageProduct" runat="server" Height="200px" Width="200px" /></td>
                <td>
                    <table class="InfoProduct" width="100%">
                        <tr>
                            <td colspan="2"><h3 style="text-align:center">Thông tin sản phẩm</h3></td>
                        </tr>
                         <tr>
                            <td>Tên sản phẩm : 
                                
                            </td><td><asp:Label ID="LabelProductName" runat="server"></asp:Label>
                                 <asp:HiddenField ID="HiddenFieldProductID" runat="server" />
                             </td>
                        </tr>
                        <tr>
                            <td>Loại sản phẩm : 
                                </td><td> 
                                <asp:Label ID="LabelCategory" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>Đơn vị tính : 
                                </td><td> 
                                <asp:Label ID="LabelQuantityPerUnit" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>Đơn giá : 
                                </td><td> 
                                <asp:Label ID="LabelUnitPrice" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>Mô tả : 
                                </td><td> 
                                <asp:Label ID="LabelDiscription" runat="server"></asp:Label>
                            </td>
                        </tr>
                         <tr>
                            <td>Số lượng còn lại : 
                                </td><td> 
                                <asp:Label ID="LabelDiscount" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </td>
               
            </tr>
            <tr>
                <td colspan="2">
                <fieldset>
                    <legend>Mua hàng</legend>
                        <table>
                            <tr>
                                <td><label>Số lượng : </label></td>
                                <td><input type="text" id="txt_Quantity" class="required" value="1"/></td>
                                <td><input type="button" id="btOrder" value="Mua hàng" /></td>
                            </tr>
                        </table>
                </fieldset>
                </td>
            </tr>
        </table>
    <div id="divBasket"></div>
    </div>
    <script src="Scripts/Basket.js"></script>
    <script>
        $().ready(function () {
            $('#btOrder').click(function () {
                addProduct('<%=HiddenFieldProductID.ClientID%>', '<%=LabelProductName.ClientID%>', 'txt_Quantity', '<%=LabelQuantityPerUnit.ClientID%>', '<%=LabelUnitPrice.ClientID%>');
            });
        });
    </script>